<template>
  <t-table-column
    v-if="config.children"
    :col="config"
    :colspan="config.colspan"
    :rowspan="config.rowspan"
    :title="config.label"
  >
    <dynamic-header
      v-for="(child, idx) in config.children"
      :key="idx"
      :config="child"
    />
  </t-table-column>
  <t-table-column
    v-else
    :col="config"
    :title="config.label"
  />
</template>

<script setup>
import { defineProps } from 'vue';

defineProps({
  config: {
    type: Object,
    required: true
  }
});
</script>